<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button id="btn1">获取数据</button>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
<script>
    $("#btn1").click(function () {
        $.ajax({
            url:"/data",
            type:"post",
            dataType:"json",
            data:{
                name:"data",
                pas:"1"
            },
            success:function (data) {
                console.log(data.a,data)
            }
        })
    })
</script>

</body>
</html>